const { DataTypes } = require('sequelize');
const sequelize = require('../connect'); // Adjust the path as necessary

const Admin = sequelize.define('Admin', {
    id: {
        type: DataTypes.INTEGER,
        autoIncrement: true,
        primaryKey: true
    },
    name: {
        type: DataTypes.STRING,
        allowNull: false
    },
    username: {
        type: DataTypes.STRING,
        allowNull: false
    },
    password: {
        type: DataTypes.STRING,
        allowNull: false
    },
    avatar: {
        type: DataTypes.STRING,
        allowNull: true
    },
    desc: {
        type: DataTypes.TEXT,
        allowNull: true
    }
}, {
    tableName: 'admins',
    timestamps: false
});


console.log("==> The table for the Admin model was just (re)created!");
module.exports = Admin;